package com.shujia.dim

import com.shujia.util.FlinkTool


object DImKafkaMysqlRegion extends FlinkTool {

  override def run(args: Array[String]): Unit = {


    /**
      * 地区维度表
      *
      */

    table.executeSql(
      """
        |insert into gma_dim.dim_kafka_mysql_region
        |select a.id,name,area_code,region_name from
        |gma_ods.ods_mysql_kafka_base_province /*+ OPTIONS('scan.startup.mode'='earliest-offset') */ as a
        |left join
        |gma_ods.ods_mysql_kafka_base_region /*+ OPTIONS('scan.startup.mode'='earliest-offset') */ as b
        |on a.region_id=b.id

      """.stripMargin)


  }
}
